home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ABUSESRC.ZIP / AbuseSrc / abuse / inc / ramfile.hpp < prev    next >
C/C++ Source or Header  |  1996-01-24  |  708b  |  28 lines

  1.  
  2.  
  3. #ifndef __RAM_FILE_HPP_
  4. #define __RAM_FILE_HPP_
  5.  
  6. #include "specs.hpp"
  7.  
  8. class ram_file : public bFILE 
  9. {
  10.   uchar *buf;
  11.   int buf_size;
  12.   int buf_end;
  13.  
  14.   virtual int allow_read_buffering();
  15.   virtual int allow_write_buffering();
  16.   public :
  17.   ram_file();
  18.   virtual int open_failure();
  19.   virtual int unbuffered_read(void *buf, size_t count);       // returns number of bytes read
  20.   virtual int unbuffered_write(void *buf, size_t count);      // returns number of bytes written
  21.   virtual int unbuffered_seek(long offset, int whence);  // whence=SEEK_SET, SEEK_CUR, SEEK_END, ret=0=success
  22.   virtual int unbuffered_tell();
  23.   virtual int file_size();
  24.   virtual ~ram_file();
  25. } ;
  26.  
  27. #endif
  28.